#ifndef LEVELBLOCK_H
#define LEVELBLOCK_H

#include "Object.h"


enum BLK_DIRECTION
{
    BLK_DIR_NONE,
    BLK_DIR_LEFT,
    BLK_DIR_RIGHT,
    BLK_DIR_UP,
    BLK_DIR_DOWN,
};

enum BLK_TYPE
{
    BLK_TYP_EMPTY,
    BLK_TYP_WATER,
    BLK_TYP_GENERIC,
};


class LevelBlock
{
public:

    virtual ~LevelBlock();
    bool isCrossable();

    void setCrossable(bool is)
    {
        m_isCrossable=is;
    };

    void setName(const std::string &_name)
    {
        m_name=_name;
    };
    std::string getName()
    {
        return m_name;
    };
    virtual void setPosition(Ogre::Vector2 _position);
    Ogre::Vector2 getPosition();

    virtual OBJ_TYPE getType();

    Ogre::Real facePoint(const Ogre::Vector2 &point);

    Ogre::SceneNode* getSceneNode()
    {
        return m_node;
    };

    void setNode(Ogre::SceneNode *_node);
    void setEntity(Ogre::Entity *_entity);

    void setYOffset(float _val)
    {
        m_Yoffset=_val;
    };

protected:

    LevelBlock();

    bool m_isCrossable;
    std::string m_name;



private:



    Ogre::SceneNode* m_node;
    Ogre::Entity* m_entity;

    float m_Yoffset;



    Ogre::Vector2 m_position;

    static unsigned int m_id;


};

#endif // LEVELBLOCK_H
